import request from '@/utils/request'

// 查询
export function permissionList() {
  return request({
    url: '/admin/permission/permission',
    method: 'get'
  })
}

// 获取管理员权限路由菜单
export function routeList() {
  return request({
    url: '/admin/permission/permission/routes',
    method: 'get'
  })
}

// 新增
export function store(data) {
  return request({
    url: '/admin/permission/permission/store',
    method: 'post',
    data: data
  })
}

// 更新
export function update(data, id) {
  return request({
    url: `/admin/permission/permission/update/${id}`,
    method: 'put',
    data: data
  })
}

export function destroy(id) {
  return request({
    url: `/admin/permission/permission/destroy/${id}`,
    method: 'delete'
  })
}
